<ion-view view-title="历史交易记录">
    <ion-nav-buttons side="left">
        <back-button></back-button>
    </ion-nav-buttons>
    <ion-content class="trade-log" ng-class="{'has-loading': isOffline}">
        <ion-refresher pulling-text={{PULLING_TEXT}} pulling-icon="" refreshing-text={{REFRESHING_TEXT}}
                       on-refresh="doRefresh()"></ion-refresher>

        <div ng-repeat="date in dates">
            <div ng-class="{'expand':dateMap[date].isExpand,'panel':true}" >
                <time class="item" ng-click="dateMap[date].isExpand=!dateMap[date].isExpand;expand();"><i class="icon_date"></i>{{date}}</time>
                <dl ng-repeat="record in dateMap[date]">
                    <a ng-href="{{record.url}}">
                        <dt>{{record.prod_name}}<time>{{record.entrust_time}}</time></dt>
                        <dd>
                            <ul class="clearfix">
                                <li>{{record.buyOrSell=="0" ? "购买金额(元)" : "卖出份额(份)"}}<em class="amount">{{record.entrust_balance}}</em></li>
                                <li>交易状态<em class="{{record.success_class}}">{{record.entrust_status_name}}</em></li>
                            </ul>
                        </dd>
                    </a>
                </dl>
            </div>
        </div>
        <div class="little-tip"></div>
        <div class="little-tip ng-hide" ng-show="param.isLoaded" style="margin-top: 10px" ng-if="dates.length == 0">支持查询该产品三年内的交易记录</div>
        <div class="little-tip ng-hide" ng-show="param.isLoaded" ng-if="dates.length != 0">支持查询该产品三年内的交易记录</div>
    </ion-content>
</ion-view>